package com.baymax.security.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 认证配置
 *
 * @Author: baymax
 * @CreateTime: 2023/3/30 15:43
 * @Version: 1.0
 */
@ConfigurationProperties(prefix = "security")
@Component
@Data
public class SecurityProperties {

    /**
     * 用户在线key
     */
    private String onlineKey;

    /**
     * token过期时间
     */
    private Long expirationTime;

    /**
     * 令牌刷新时间
     */
    private Long refreshTokenTime;

    /**
     * refreshToken有效期，30天
     */
    private Integer effectiveDay;

    /**
     * token前缀
     */
    private String tokenHeader;

    /**
     * token请求头
     */
    private String authentication;

    /**
     * refreshToken请求头
     */
    private String refreshAuthentication;

    /**
     * 同个用户只允许登录一次
     */
    private Boolean single;
}
